#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int gcd(int a,int b){
    return b==0?a:gcd(b,a%b);
}
int main(){
    int T,n,a,b;
    cin>>T;
    int ans;
    while(T--){
        ans=0;
        cin>>n>>a>>b;
        if(n==1||n==3) cout<<"Yes"<<endl;
        if(n==2) cout<<"No"<<endl;
        else {
        int c=gcd(a,b);
        int ans=n/c;
        if(ans&1) cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
        }
    }
    return 0;
}
